package main

import (
	"fmt"
)

// 演示golang中基本数据类型的转换
func main() {
	var i int = 100
	// 希望将i转换为float

	var n1 float32 = float32(i)
	fmt.Println("i = ", i)
	fmt.Println("n1 = ", n1)

	var n2 int8 = int8(i)
	fmt.Printf("i = %v n1 = %v n2 = %v", i, n1, n2)
} 